import java.awt.*;
import java.io.File;
import java.io.IOException;
public class Main {
    public static void main(String[] args) {
        try {
            //照片存放的路径
            String path = "D:\\image\\1.jpg";
            //调用CreateImg类，生成图片
            System.out.println(new CreateImg().getImage(path));
            //调用Desktop类，打开图片
            Desktop.getDesktop().open(new File(path));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
